InBox TicketTimer

Version 7.0.1

Creation date 22/01/2019

Resources

This module creates a stopwatch for timekeeping on the device screen. clerk.

Prerequisites

Framework

The following Znuny framework versions are supported:

  • [7.0.x]

Modules

The following modules are required:

  • InBox Core 7.0.1 or superior
  • Perl module: URI::Encode

Operational system

The following operating systems are required:

  • [None]

Third Party Software

The following third party software is required:

  • Server Socket.io

Installation

bin/znuny.Console.pl Admin::Package::Install /path/to/InBox\ TicketTimer-7.0.1.opm

Server Socket.io

To install or upload the Socket.io server, follow the steps below:

  • Install Node.js and npm on the server:

Add NodeSource to yum repository

curl -sL https://rpm.nodesource.com/setup_10.x | bash -

Install Node.js and npm

yum install -y nodejs
  • Install required node modules:

Clone the repository and access the server-socket.io folder, or download just the app.js and package.json files to the server.

Access the folder where these files are located and execute the commands below:

Install required node modules

npm install

Install module to start server

npm install forever -g

Start server socket.io

forever start app.js

To stop the server run

forever stop http_server.js

Test if the server has the command:

curl "http://127.0.0.1:3000/?EIO=4&transport=polling"

Or accessing in the browser

http://127.0.0.1:3000

Configuration

TicketTimer::TicketMaxTime

Set the maximum time for the stopwatch.

TicketTimer::Core::CloseOldTimerOnStart

Set the option to close the attendant's previous timers when enabling a new timer.

TicketTimer::Core::AutoTransferOwnership

Set the option to transfer ticket ownership to current attendant when starting a new timer.

SocketIO::Core###URL

Configuration present in the InBox Core 7.0.1 package.

Set the socket.io server URL. Note: If you use socket.io on the same server and you have done a reverse proxy, enable the 'SocketIO::Core::Path' setting.

SocketIO::Core###Path

Configuration present in the InBox Core 7.0.1 package.

Set the socket.io server path if you use socket.io on the same server as the system application and you have done a reverse proxy. Default value: '/znuny/socket/'.

Using the Generic Attendant script to update ticket status through the timer.

You can use a Generic Attendant based on the custom script present in the InBox TicketTimer module ticketed “ChangeTicketsStatus”. With it, when starting a ticket timer, all other tickets from the same client will have their states changed as the state configured in the Generic Attendant.

Configuring the generic attendant

Set up a Generic Attendant to run next to the event: TicketDynamicFieldUpdate_TicketTimerSetStatus

img1

Under “Select Tickets”, set the TicketTimerSetStatus field to “Start”.

img2

In “Run custom module”, follow the path: Kernel::System::GenericAgent::ChangeTicketsStatus and set the parameters as follows:

Key Value
Flag 1
NextState Next state
CurrentStateType Type of state to change

“Flag” should contain value 1 for Stopwatch Start, “NextState” will be next ticket state and “CurrentStateType” the type of tickets to change.

Exemple:

img3

Once this is done, you will need to set up a second generic attendant to get back to your previous states. To do this, configure a new generic attendant to run next to the event: TicketDynamicFieldUpdate_TicketTimerSetStatus

img4

Under “Select Tickets”, set the TicketTimerSetStatus field to: “Stop” or to “Pause” depending on your application.

img5

In “Run custom module”, follow the path:Kernel::System::GenericAgent::ChangeTicketsStatus and set the parameters as follows:

Key Value
Flag 1
CurrentState Current state of tickets

“Flag” should contain a value of 2 for Pause or Stopwatch and “CurrentState” the name of the current state of tickets that were changed when starting the timer.

img6

Using the Generic Attendant to stop the timer when an event is triggered in the ticket.

As an example, an event will be created for when the ticket is changed queue, the stoptimer will be stopped like TicketQueueUpdate.

In “Execute custom module”, run the path: Kernel::System::GenericAgent::EventStopTimer

Execute custom module

JavaScript file

Verify the JavaScript file inbox-thirdparty/socket.io-client/dist/socket.io.js is loaded in system configuration Loader::Module::AgentTicketZoom###002-Ticket.

If not, add the file inbox-thirdparty/socket.io-client/dist/socket.io.js. Note: The file must be loaded on top of the file Core.Agent.TicketTimer.js.

Use

Click the stopwatch "Start" button on the right side of the ticker screen to make the ticker time count.

img10

Click the stopwatch “Stop” button on the right side of the ticker screen so that the ticker time stops counting.

img11

Checking Time Reports

In order to view the time counted by the attendants through the timer and its state, it is necessary to follow the steps below: Navigate to ‘Administration > Overview’ and choose de File Management Stopwatches':

img12

After that, the timer management screen will be displayed, where you can check the number of tickets the timer is active on, its attendant, the time counted and the status of the timer (Paused or In Progress).

img13